<div>
    <ul class="breadcrumb">
        <li>
            <a href="<?php echo site_url('m-admin/home')?>">管理首页</a> <span class="divider">/</span>
        </li>
        <li>
            <a href="javascript:void(0);" onclick="change_channel('contents');">内容管理</a> <span class="divider">/</span>
        </li>
        <li>
            <a href="<?php echo site_url('m-admin/order');?>">订单管理</a> <span class="divider">/</span>
        </li>

        <li>
            退款申请列表
        </li>
    </ul>
</div>

<div class="row-fluid">
	<div class="box">
			<div class="box-header well" data-original-title="">
				<h3>查询</h3>
				<div class="box-icon">
					<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
				</div>
			</div>
		
			<div class="box-content" style="display: block;">
                <form action="<?php echo site_url('m-admin/order')?>" >
                    订单号:
                    <input type="text" name="order_id" class="input-small" />
                    用户ID:
                    <input type="text" name="user_id" class="input-small"  />
                    活动ID:
                    <input type="text" name="activity_id" class="input-small" />
                    <button id="save_form_btn" type="submit" class="btn btn-primary">查询</button>
                </form>
        </div>     																																										       
	</div>
    <!--列表-->

    <table class="table table-striped table-bordered">
        <thead>
        <tr>
            <th>订单号</th>
            <th>支付流水</th>
            <th>用户名</th>
            <th>退款原因</th>
            <th>申请时间</th>
            <th>状态</th>
        </tr>
        </thead>
        <tbody id="data_body">
        <?php if($pagination['list']): foreach($pagination['list'] as $vo):?>
            <tr id="data<?php echo $vo['id'];?>">
                <td><?php echo $vo['order_id'];?></td>
                <td>
                    <a href ="<?php echo site_url('m-admin/order/serial').'?serial_number='.$vo['serial_number'];?>" ><?php
                        echo $vo['serial_number'];
                    ?></a>
                </td>
                <td>
                    <?php
                        echo $vo['username'];
                    ?>
                </td>
                <td>
                    <?php
                    echo $vo['source'];
                    ?>
                </td>
                <td>
                    <?php
                        echo $vo['created'];
                    ?>
                </td>

                <td>

                </td>
            </tr>
        <?php endforeach;endif;?>
        </tbody>
    </table>

    <div class="row-fluid pagination pagination-centered">
        <?php echo $pagination['page_html'];?>
    </div>
    <!--/列表-->
</div>


<script  type="text/javascript">

    function del(id)
    {
        if(!confirm('确定要删除当前活动信息？'))
            return false;
        $.post(
            "<?php echo site_url('m-admin/activity/del')?>",
            { id: id, action: 'del' },
            function(response){
                if(response.status) {
                    $('#data' + id).fadeOut();
                }else if(!response.status){
                    alert(response.msg);
                }else {
                    alert('操作失败，请重试或联系管理员！');
                    console.log(response);
                }
            },
            'json');
        return false;
    }

    function reback(id)
    {
        if(!confirm('确定要恢复当前活动信息？'))
            return false;
        $.post(
            "<?php echo site_url('m-admin/activity/re_back')?>",
            { id: id },
            function(response){
                if(response.status) {
                    $('#data' + id).fadeOut();
                }else if(!response.status){
                    alert(response.msg);
                }else {
                    alert('操作失败，请重试或联系管理员！');
                    console.log(response);
                }
            },
            'json');
        return false;
    }

    function sold_on(id)
    {
        if(!confirm('确定要上架此活动信息？'))
            return false;
        $.post(
            "<?php echo site_url('m-admin/activity/do_sold')?>",
            { id: id },
            function(response){
                if(response.status) {
                    $('#data' + id).fadeOut();
                }else if(!response.status){
                    alert(response.msg);
                }else {
                    alert('操作失败，请重试或联系管理员！');
                    console.log(response);
                }
            },
            'json');
        return false;
    }

    function sold_off(id)
    {
        if(!confirm('确定要下架当前活动信息？'))
            return false;
        $.post(
            "<?php echo site_url('m-admin/activity/do_soldout')?>",
            { id: id },
            function(response){
                if(response.status) {
                    $('#data' + id).fadeOut();
                }else if(!response.status){
                    alert(response.msg);
                }else {
                    alert('操作失败，请重试或联系管理员！');
                    console.log(response);
                }
            },
            'json');
        return false;
    }

</script>